﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VLUNewsBusiness.Utilities
{
    public class SqlString
    {
        // VluNewsModuleSettings
        public const string getNewsRoleGroup = "select SettingValue from VluNewsModuleSettings where SettingName = '{0}'";
        public const string updateNewsRoleGroup = "update VluNewsModuleSettings set SettingValue = {1}, LastModifiedByUserID = {2}, LastModifiedOnDate = {3} where SettingName = {0}";
        // VluNewsSitemap
        public const string updateSitemapOrder = "update VluNewsSitemap set SortOrder = {1}, LastModifiedByUserID = {2}, LastModifiedOnDate = {3} where SiteMapID = {0}";
        // VluNewsHtmlContent
        public const string SaveSentToRole = "update VluNewsHtmlContent set LastModifiedByUserID = {0}, LastModifiedOnDate = {1}"
            + ", Status = {2}, SenderID = {3}, ReceiverID = NULL, RolerID = {4}, OwnerID = {0} where HtmlContentID = {5}";
        public const string SaveSentToUser = "update VluNewsHtmlContent set LastModifiedByUserID = {0}, LastModifiedOnDate = {1}"
            + ", Status = {2}, SenderID = {3}, ReceiverID = {4}, RolerID = NULL, OwnerID = {0} where HtmlContentID = {5}";
        public const string SaveReturned2l = "update VluNewsHtmlContent set LastModifiedByUserID = {0}, LastModifiedOnDate = {1}"
            + ", Status = {2}, SenderID = {3}, ReceiverID = SenderID, RolerID = NULL, OwnerID = {0} where HtmlContentID = {4}";
        public const string SaveReturned = "update VluNewsHtmlContent set LastModifiedByUserID = {0}, LastModifiedOnDate = {1}"
            + ", Status = {2}, SenderID = {3}, ReceiverID = {4}, RolerID = NULL, OwnerID = {0} where HtmlContentID = {5}";
        public const string SaveApproved = "update VluNewsHtmlContent set LastModifiedByUserID = {0}, LastModifiedOnDate = {1}"
            + ", Status = {2}, IsPost = 1, PostTime = {1}, OwnerID = {0} where HtmlContentID = {3}";
        public const string SaveDowned = "update VluNewsHtmlContent set LastModifiedByUserID = {0}, LastModifiedOnDate = {1}"
            + ", Status = {2}, IsPost = 0, OwnerID = {0} where HtmlContentID = {3}";
        public const string SaveDeleted = "update VluNewsHtmlContent set LastModifiedByUserID = {0}, LastModifiedOnDate = {1}"
            + ", Status = {2}, OwnerID = {0} where HtmlContentID = {3}";
        public const string Delete = "delete VluNewsComment where HtmlContentID = {0}"
            + "; delete VluNewsHtmlContentTracker where HtmlContentID = {0}"
            + "; delete VluNewsHtmlContent where HtmlContentID = {0}";
    }
}
